import request from '@/utils/request'

export default {
  pmList(params) {
    return request({
      url: '/v1/pmList',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/pm/${id}`,
      method: 'get'
    })
  },
  update(data) {
    return request({
      url: '/v1/pmUpdate',
      method: 'post',
      data
    })
  },
  create(data) {
    return request({
      url: '/v1/pmAdd',
      method: 'post',
      data
    })
  },
  archives(id) {
    return request({
      url: `/v1/pmArchive/${id}`,
      method: 'get'
    })
  },
  delete(id) {
    return request({
      url: `/v1/pmDel/${id}`,
      method: 'get'
    })
  },
  review(data) {
    return request({
      url: '/v1/pmReview',
      method: 'post',
      data
    })
  },
  appendParts(data) {
    return request({
      url: '/v1/pmAppendParts',
      method: 'post',
      data
    })
  },
  removeParts(data) {
    return request({
      url: '/v1/pmRemoveParts',
      method: 'post',
      data
    })
  },
  editParts(data) {
    return request({
      url: '/v1/pmEditParts',
      method: 'post',
      data
    })
  },
  needParts(data) {
    return request({
      url: '/v1/pmNeedParts',
      method: 'post',
      data
    })
  },
  appendMember(data) {
    return request({
      url: '/v1/pmAppendStaff',
      method: 'post',
      data
    })
  },
  removeMember(data) {
    return request({
      url: '/v1/pmRemoveStaff',
      method: 'post',
      data
    })
  },
  appendTask(data) {
    return request({
      url: '/v1/pmAppendTask',
      method: 'post',
      data
    })
  },
  removeTask(data) {
    return request({
      url: '/v1/pmRemoveTask',
      method: 'post',
      data
    })
  },
  appendTaskGroup(data) {
    return request({
      url: '/v1/pmAppendTaskGroup',
      method: 'post',
      data
    })
  },
  giveOut(id) {
    return request({
      url: `/v1/pmGiveOut/${id}`,
      method: 'get'
    })
  },
  appendDelay(data) {
    return request({
      url: '/v1/pmAppendDelay',
      method: 'post',
      data
    })
  },
  removeDelay(data) {
    return request({
      url: '/v1/pmRemoveDelay',
      method: 'post',
      data
    })
  },
  reviewDelay(data) {
    return request({
      url: '/v1/pmReviewDelay',
      method: 'post',
      data
    })
  },
  submitReading(data) {
    return request({
      url: '/v1/pmSubmitReading',
      method: 'post',
      data
    })
  },
  jhb(data) {
    return request({
      url: '/v1/pmJhb',
      method: 'post',
      data
    })
  }
}
